Ext.define('IAG.model.Log', {
    extend: 'Ext.data.Model',
    idProperty: 'id',
    fields: ['id', 
             "timeMillis", 'feedTag','url','timestamp', 'localUrl','description',
             {name:"zipped",type:"boolean"},
             {name:"standard",type:"boolean"},
             {name:"importStatus",type:"int"}
             ],
  
    proxy: {
        type: 'rest',
        api: {
        	create: iag_constants.logs_url,
            read:  iag_constants.logs_url,
            update: iag_constants.logs_url,
            destroy: iag_constants.logs_url
        },
        reader: {
            type: 'json',
            root: 'Logs.Log',
            successProperty: 'Log'
        },
        encodeFilters: function(filters) {
        	var filterStrs = [];

        	for (var i = 0; i < filters.length; i++) {
        		filterStrs[i] = filters[i].property + '#' + filters[i].value
        	}

        	return filterStrs.join(",");
        }

    }
});